import { GetCurrentLoginInformationsOutput } from '/@/shared/service-proxies';
import { defineStore } from 'pinia';
import { store } from '/@/shared/store';

export interface IAbpState {
  abp: any;
  loginInfo: GetCurrentLoginInformationsOutput;
}

// export default AbpStore;
export const AbpStore = defineStore({
  id: 'abp',
  state: () => ({
    abp: {},
    loginInfo: undefined,
  }),
  actions: {
    set(val) {
      this.abp = val;
    },
    setLoginInfo(val) {
      this.loginInfo = val;
    },
  },
  getters: {
    get(): any {
      return this.abp;
    },
    getLoginInfo(): any {
      return this.loginInfo;
    },
  },
});
export function useAbpStore() {
  return AbpStore(store);
}
